## Figure 1A


require(foreign)

hou.data <- read.dta("h107.dta")
sen.data <- read.dta("s107.dta")

windows(width=8.5,height=5) 
par(mfrow=c(1,2))
par(mgp=c(1.5, .5, 0))
par(mar=c(2.75,2.5, 1.5, .5))

plot(density(hou.data$peace), xlim=c(-2, 2), cex.main=1.05, ylim=c(0,.8), lwd=2, lty=2, xlab="Ideal Points", main="107th House Ideal Points")
lines(density(hou.data$war), lwd=2)

plot(density(sen.data$peace), xlim=c(-2, 2), lwd=2, lty=2, cex.main=1.05,xlab="Ideal Points", main="107th Senate Ideal Points")
lines(density(sen.data$war), lwd=2)


## Figure 1B

windows(width=8.5,height=5) 
par(mfrow=c(1,2))
par(mgp=c(1.5, .5, 0))
par(mar=c(2.75,2.5, 1.5, .5))

plot(hou.data$peace[hou.data$party=="DEM" & hou.data$sig==1], hou.data$war[hou.data$party=="DEM" & hou.data$sig==1], pch=20, xlim=c(-2,2), ylim=c(-2,2), xlab="Before War on Terror", ylab="During War on Terror", main="107th House")
points(hou.data$peace[hou.data$party=="DEM" & hou.data$sig==0], hou.data$war[hou.data$party=="DEM" & hou.data$sig==0], pch=20,col="GREY")
points(hou.data$peace[hou.data$party=="REP" & hou.data$sig==1], hou.data$war[hou.data$party=="REP" & hou.data$sig==1], pch=17)
points(hou.data$peace[hou.data$party=="REP" & hou.data$sig==0], hou.data$war[hou.data$party=="REP" & hou.data$sig==0], pch=17,col="GREY")
abline(0,1)
text(-1.25,2,"MORE CONSERVATIVE",cex=0.8)
text(1.5,-2,"MORE LIBERAL",cex=0.8)

par(mfrow=c(1,2))
plot(sen.data$peace[sen.data$party==100 & sen.data$sig==1], sen.data$war[sen.data$party==100 & sen.data$sig==1], pch=20, xlim=c(-2,2), ylim=c(-2,2), xlab="Before War on Terror", ylab="During War on Terror", main="107th House")
points(sen.data$peace[sen.data$party==100 & sen.data$sig==0], sen.data$war[sen.data$party==100 & sen.data$sig==0], pch=20,col="GREY")
points(sen.data$peace[sen.data$party==200 & sen.data$sig==1], sen.data$war[sen.data$party==200 & sen.data$sig==1], pch=17)
points(sen.data$peace[sen.data$party==200 & sen.data$sig==0], sen.data$war[sen.data$party==200 & sen.data$sig==0], pch=17,col="GREY")
abline(0,1)
text(-1.25,2,"MORE CONSERVATIVE",cex=0.8)
text(1.5,-2,"MORE LIBERAL",cex=0.8)